﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GUI/Admin/QuanLy.master" AutoEventWireup="true" CodeBehind="QL-CaSi.aspx.cs" Inherits="ProjectWebNhac.GUI.Admin.QL_CaSi" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="js/jquery.min.js" type="text/javascript"></script>
    
    <script src="js/fileInput/jquery.fileinput.min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function () {

        $("table").dataTable(
        { "sPaginationType": "full_numbers",
            "bPaginate": true,
            "bSort": false,
            "bFilter": true,
            "bInfo": false,
            "bLengthChange": false,
            "iDisplayLength": 5,
            "bJQueryUI": false
        });
        //        $('#test').click(function () {
        //       
        //            $.ajax({
        //                type: "POST",
        //                url: "QL-CaSi.aspx/HelloWorld",
        //                data: "{}",
        //                contentType: "application/json",
        //                dataType: "json",
        //                success: function (msg) {
        //                   
        //                    // Replace the div's content with the page method's return.
        //                   
        //                }
        //            });
        //        });
        var TxtTenCaSi = $('#<%=TxtTenCaSi.ClientID %>');
        var txtTenCaSiEdit = $('#<%=txtTenCaSiEdit.ClientID %>');
        var txtCTyDaiDien = $('#<%=txtCTyDaiDien.ClientID %>');
        var txtCTyDaiDienEdit = $('#<%=txtCTyDaiDienEdit.ClientID  %>');
        var txtNgaySinh = $('#<%=txtNgaySinh.ClientID %>');
        var txtNgaySinhEdit = $('#<%=txtNgaySinhEdit.ClientID %>');
        var txtTheLoaiNhac = $('#<%=txtTheLoaiNhac.ClientID %>');
        var txtTheLoaiNhacEdit = $('#<%=txtTheLoaiNhacEdit.ClientID %>');
        var txtTTChiTiet = $('#<%=txtTTChiTiet.ClientID %>');
        var txtTTChiTietEdit = $('#<%=txtTTChiTietEdit.ClientID %>');
        var txtMaCasi = $('#<%=txtMaCasi.ClientID %>');
        $('#btnEdit').click(function () {

            txtTenCaSiEdit.val(TxtTenCaSi.val());
            txtCTyDaiDienEdit.val(txtCTyDaiDien.val());
            txtTheLoaiNhacEdit.val(txtTheLoaiNhac.val());
            txtTTChiTietEdit.val(txtTTChiTiet.val());
            txtNgaySinhEdit.val(txtNgaySinh.val());
        });

//        $('#btnSave').click(function () {

//            $.ajax({
//                type: "POST",
//                url: "QL-CaSi.aspx/SaveEdit",
//                data: "{'MaCaSi':'" + txtMaCasi.val() + "','TenCaSi':'" + txtTenCaSiEdit.val()
//                 + "','NgaySinh':'" + txtNgaySinhEdit.val() + "'}",
//                contentType: "application/json",
//                dataType: "json",
//                success: function (msg) {

//                    // Replace the div's content with the page method's return.

//                }
//            });
//        });
//        function SaveEdit() {

//        }
    }); 
</script>
    <asp:Panel ID="pnSuccess" Visible="false" runat="server">
    <div class="alert alert-block alert-success fade in">
<button class="close" type="button" data-dismiss="alert"> × </button>
<h4 class="alert-heading"> Thành công! </h4>

</div>
    </asp:Panel>
    <asp:HiddenField ID="txtMaCasi" runat="server" /> 
            <div class="page-header">
            <div class="pull-left">
              <h2>Quản Lý Ca Sĩ</h2>
            </div>
            <div class="pull-right">
              <ul class="stats">
                <li class="color-second">
                  <span class="fs1" aria-hidden="true" data-icon=""></span>
                  <div class="details" id="date-time"><span class="big">June 20th 2013</span><span>Thu 09:11:00 am</span></div>
                </li>
              </ul>
            </div>
            <div class="clearfix"></div>
            </div>
            
            <div class="row-fluid">
                <asp:Panel ID="pnDetail" runat="server">
                <div class="span6">
              <div class="widget no-margin">
                <div class="widget-header">
                  <div class="title">
                    <span class="fs1" aria-hidden="true" data-icon=""></span> Thông Tin Ca Sĩ
                  </div>
                </div>
                <div class="widget-body">
                  <div class="row-fluid">
                    <div class="span4">
                      <div class="thumbnail">
                          <asp:Image ID="imgHinhAnh" runat="server" Width="180"
                              ImageUrl="images/male-avatar-icon-614x460.png" />
                      </div>
                    </div>
 
                    <div class="span6">
                      <form class="form-horizontal no-margin">
                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Tên Ca Sĩ
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="TxtTenCaSi" Enabled="false" runat="server"></asp:TextBox>
                          </div>
                        </div>

                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                             Ngày Sinh
                          </label>
                          <div class="span8">
                           <asp:TextBox ID="txtNgaySinh"  Enabled="false" runat="server"></asp:TextBox>
                          </div>
                        </div>

                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Công Ty Đại Diện
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="txtCTyDaiDien" Enabled="false" runat="server"></asp:TextBox>
                          </div>
                        </div>

                        <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Quốc Gia
                          </label>
                          <div class="span8">
                          <%--<asp:TextBox ID="txtQuocGia" runat="server"></asp:TextBox>--%>
                              <asp:DropDownList ID="drQuocGia" Enabled="false" CssClass="span12 input-left-top-margins" runat="server">
                              </asp:DropDownList>
                          </div>
                        </div>

                        <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Thể Loại Nhạc
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="txtTheLoaiNhac" Enabled="false" runat="server"></asp:TextBox>
                          </div>
                        </div>

                        <div class="row-fluid" style="float: left; margin-left: -178px;">
                        <label class="span4" style="width:120px"> Thông Tin Chi Tiết </label>
                        <div class="span8" style="margin-left: -4px; width: 123px;">

                        <asp:TextBox ID="txtTTChiTiet"  Enabled="false" style="width:384px;height:190px" runat="Server" TextMode="MultiLine" ></asp:TextBox>
                        </div>
                        </div>
                        <div>
                      <asp:FileUpload ID="flhinhanh" runat="server" />
                    </div>

                      <div class="form-actions " style="float: left; margin-left: -178px; width: 476px;">
                         <div class="span2">
                         <asp:LinkButton ID="lnkThem" 
                                  CssClass="btn btn-primary input-top-margin" runat="server" 
                                  onclick="lnkThem_Click" Text="Thêm" ></asp:LinkButton>
                         </div>
                       
                         <div id="divEdit" class="span2" runat="Server" visible=false>
                            <a href="#formEdit" id="btnEdit" role="button" class="btn btn-primary input-top-margin" data-toggle="modal" data-original-title="">edit</a>
                         </div>
                         <div class="span2">
                         <asp:LinkButton ID="lnkHuy" Visible=false CssClass="btn btn-danger input-top-margin" 
                                    runat="server" onclick="lnkHuy_Click">Hủy</asp:LinkButton>
                         </div>
                        
                        </div>  

                      </form>
                    </div>
                   
                    

                  </div>
                  
<div id="formEdit" class="modal hide fade" tabindex="-4" role="dialog" aria-labelledby="myModalLabel4" aria-hidden="true">
                              <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                  ×
                                </button>
                                <h4 id="myModalLabel4">
                                  Chỉnh sửa thông tin ca sĩ
                                </h4>
                              </div>
                              <div class="modal-body">
                                
                  <div class="row-fluid">
                    <div class="span4">
                      <div class="thumbnail">
                          <asp:Image ID="imgHinhAnhEdit" runat="server" Width="180"
                              ImageUrl="images/male-avatar-icon-614x460.png" />
                      </div>
                    </div>
 
                    <div class="span6">
                      
                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Tên Ca Sĩ
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="txtTenCaSiEdit" runat="server" ></asp:TextBox>
                          </div>
                        </div>

                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                             Ngày Sinh
                          </label>
                          <div class="span8">
                           <asp:TextBox ID="txtNgaySinhEdit"   runat="server"></asp:TextBox>
                          </div>
                        </div>

                         <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Công Ty Đại Diện
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="txtCTyDaiDienEdit"  runat="Server" ></asp:TextBox>
                          </div>
                        </div>

                        <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Quốc Gia
                          </label>
                          <div class="span8">
                          <asp:DropDownList ID="drQuocGiaEdit"  CssClass="span12 input-left-top-margins" runat="server">
                          </asp:DropDownList>
                          </div>
                        </div>

                        <div style="width: 348px;" class="row-fluid">
                          <label class="span4">
                            Thể Loại Nhạc
                          </label>
                          <div class="span8">
                          <asp:TextBox ID="txtTheLoaiNhacEdit"  runat="server"></asp:TextBox>
                          </div>
                        </div>

                        <div class="row-fluid" style="float: left; margin-left: -178px;">
                        <label class="span4" style="width:120px"> Thông Tin Chi Tiết </label>
                        <div class="span8" style="margin-left: -4px; width: 123px;">

                        <asp:TextBox ID="txtTTChiTietEdit"   style="width:384px;height:190px" runat="Server" TextMode="MultiLine" ></asp:TextBox>
                        </div>
                        </div>
                        <div>
                      <asp:FileUpload ID="flhinhanhEdit" runat="server" Visible=false />
                    </div>
                     
                    </div>
                  </div>
                 </div>
                 <div class="modal-footer">


                                <button class="btn" data-dismiss="modal" aria-hidden="true">
                                  Đóng
                                </button>
                               
                     <asp:Button ID="btnUpdate" CssClass="btn btn-primary" runat="server" Text="Lưu" 
                                    onclick="btnUpdate_Click" />
                              </div>
                </div>
                </div>
              </div>
            </div>
                
                
            <div class="span6">
              <div class="widget no-margin">
                <div class="widget-header">
                  <div class="title">
                    <span class="fs1" aria-hidden="true" data-icon=""></span> Danh Sách Bài Hát
                  </div>
                </div>
                <div class="widget-body">
                  <div id="Div1" class="example_alt_pagination">

                    <div id="Div2" class="dataTables_wrapper" role="grid">
                    
                        <asp:GridView ID="gvDSBaiHatCaSi" runat="server" 
                            CssClass="table table-condensed table-striped table-hover table-bordered pull-left dataTable" 
                            AutoGenerateColumns="False">
                            <Columns>
                              
                                <asp:BoundField DataField="TenBaiHat" HeaderText="Tên Bài Hát" />
                                
                                <asp:BoundField DataField="LuotNghe" HeaderText="Lượt Nghe">
                                <ItemStyle Width="0px" />
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="TrangThai" HeaderText="Trạng Thái" >
                                <HeaderStyle CssClass="hidden-phone" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                               <%-- <asp:TemplateField HeaderText="Xử Lý">
                                <ItemTemplate>
                                <asp:LinkButton ID="lnkXoa" CommandArgument='<%#Eval("MaAlbum")%>' CommandName="Xóa" CssClass="btn btn-inverse" runat="server" Text="Xóa"></asp:LinkButton>
                                </ItemTemplate>
                                </asp:TemplateField>--%>
                            </Columns>
                        </asp:GridView>
                        </div>
                    <div class="clearfix"></div>
                  </div>
                </div>
              </div>
            </div>
                </asp:Panel>


            </div>


            <div class="row-fluid">
            <div class="span12">
              <div class="widget no-margin">
                <div class="widget-header">
                  <div class="title">
                    <span class="fs1" aria-hidden="true" data-icon=""></span> Danh Sách Ca Sĩ
                  </div>
                </div>
                <div class="widget-body">
                  <div id="dt_example" class="example_alt_pagination">

                    <div id="data-table_wrapper" class="dataTables_wrapper" role="grid">
                    
                        <asp:GridView ID="gvDSCaSi" runat="server" 
                            CssClass="table table-condensed table-striped table-hover table-bordered pull-left dataTable" 
                            AutoGenerateColumns="False" onrowcommand="gvDSCaSi_RowCommand" 
                            onrowdatabound="gvDSCaSi_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="Mã Ca Sĩ">
                                <ItemTemplate>
                                    <asp:Label ID="lbMaCaSi" runat="server" Text='<%#Eval("MaCaSi")%>'></asp:Label>
                                </ItemTemplate>
                                    <HeaderStyle CssClass="hide" />
                                    <ItemStyle CssClass="hide" />
                                </asp:TemplateField>
                              
                                <asp:TemplateField HeaderText="Hình Ảnh">
                                <ItemTemplate>
                                 <img style="max-height:85px;max-width:85px" src="../../HinhAnh/CaSi/<%#Eval("HinhAnh")%>">
                                </ItemTemplate>
                                    <HeaderStyle CssClass="hidden-phone" HorizontalAlign="Center" />
                                    <ItemStyle Width="10%" HorizontalAlign="Center" />
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="Tên Ca Sĩ">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbDetail" CommandArgument='<%#Eval("MaCaSi")%>' CommandName="ChiTiet" runat="server"> <%#Eval("TenCaSi") %></asp:LinkButton>
                               
                                </ItemTemplate>
                                    <HeaderStyle CssClass="hidden-phone" HorizontalAlign="Center" />
                                    <ItemStyle CssClass="gradeX" HorizontalAlign="Center" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="Thể Loại">
                                <ItemTemplate>
                                    <asp:Label ID="lbTheLoai" runat="server" Text="Label"></asp:Label>
                                </ItemTemplate>
                                </asp:TemplateField>
                                
                                <asp:BoundField DataField="NgaySinh" HeaderText="Ngày Sinh" >
                                
                                <HeaderStyle CssClass="hidden-phone" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="TenQuocGia" HeaderText="Quốc Gia">
                                <ItemStyle Width="0px" />
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="CongTyDaiDien" HeaderText="Công Ty Đại Diện" >
                                <HeaderStyle CssClass="hidden-phone" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="TenChauLuc" HeaderText="Châu Lục">
                                <HeaderStyle CssClass="hide" />
                                <ItemStyle CssClass="hide" />
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
                        </div>
                    <div class="clearfix"></div>
                  </div>
                </div>
              </div>
            </div>
          </div>




</asp:Content>
